package com.haoqizhe.kernel.log.helper;

import java.util.Map;

/**
 * 切面或拦截器之间 线程传参工具类
 *
 * @author 王梅
 * @date 2018/12/12 14:34
 */
public class ThreadLocalHelper {
    private static final ThreadLocal<Map<String, String>> THREAD_LOCAL = new ThreadLocal<>();

    public static void setMap(Map<String, String> map) {
        THREAD_LOCAL.set(map);
    }

    public static Map<String, String> get() {
        return THREAD_LOCAL.get();
    }


    public static void remove() {
        THREAD_LOCAL.remove();
    }
}
